//package com.per.mybootall.rabbitmq;
//
//
//import org.redisson.api.RBloomFilter;
//import org.redisson.api.RedissonClient;
//import org.springframework.amqp.rabbit.core.RabbitTemplate;
//import org.springframework.scheduling.annotation.EnableScheduling;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//import java.util.*;
//import java.util.concurrent.CopyOnWriteArrayList;
//
///**
// * 生产者 【定时任务 5秒一执行，向rabbitmq进行数据发送】
// * */
//@Component
//@EnableScheduling
//public class Producer {
//
//    @Resource
//    private RabbitTemplate rabbitTemplate;
////    @Resource
////    private RedissonClient redissonClient;
//    @Scheduled(cron = "0/30 * * * * ?")
//    public void testMyRabbitmq(){
//
//            //rabbitTemplate.convertAndSend("myexchanges","getway","向rabbitmq发送的消息");
//       // rabbitTemplate.convertAndSend("dieExchange","dieQueue","aaaaaaaaaaaaaaaaaaa");
//
//
//        rabbitTemplate.convertAndSend("newExchange","newRoutingKey","asdasdasdasd");
//        System.out.println("两个队列都发送完成"+"asdasdasdasd");
//
////        System.out.println("布隆过滤器开始执行-=-------------------》》》》》》》》》》》》》》》》");
////        RBloomFilter<Object> bloomFilter = redissonClient.getBloomFilter("sample");
////        bloomFilter.tryInit(550L,0.03);
////        Map<Object, Object> map = new HashMap<Object, Object>() {{
////            put("yi", 1);
////            put("er", 2);
////            put("san", 3);
////        }};
////        Map<Object, Object> map2 = new HashMap<Object, Object>() {{
////            put("yi", 1);
////        }};
////        bloomFilter.add(map);
////
////       boolean bo= bloomFilter.contains(map2);
////        System.out.println("------>>>>>>>"+bo);
//
//}
//
//
//    public static void main(String[] args) throws InterruptedException {
//        List<String> li= new CopyOnWriteArrayList() ;
//        li.add("ccc");
//        li.add("aaa");
//        li.add("bbb");
//        Thread.sleep(100);
//        Thread.currentThread();
//        li.forEach(str->{
//            if(str.equals("aa")){
//                System.out.println("eq");
//            }else{
//                System.out.println(str);
//
//            }
//                });
//        li.remove("aaa");
//        System.out.println(li);
//    }
//}
